using System;
using Castle.Components.Validator;
using Iesi.Collections.Generic;

namespace WineCellar.Business.Entities
{
    public partial class Raisin
    {
        private ISet<Wine> wines = new HashedSet<Wine>();

        [ValidateNonEmpty("Name is a required field")]
        public virtual string Name { get; set; }

        public virtual DateTime? DateAdded { get; set; }

        public virtual int? Id { get; set; }

        public virtual User AddedBy { get; set; }

        public virtual ISet<Wine> Wines
        {
            get { return wines; }
            set { wines = value; }
        }

        public override string ToString()
        {
            return this.Name;
        }
    }
}